Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ExportRequest(val bbox: List<List<Double>>, val id: String, val geometry: Boolean? = null)

Request payload for the export endpoint.

Link copied to clipboard

Builder used by exportRequest.

Link copied to clipboard

Java-friendly builder counterpart.

Link copied to clipboard
@Serializable
data class ExportResponse(val nodes: List<Node> = emptyList(), val edges: List<GraphEdge> = emptyList())

Graph export response containing nodes and edges.

Link copied to clipboard
@Serializable
data class GeometryCollection(val type: String, val geometries: List<TopoGeometry>)
Link copied to clipboard
@Serializable
data class GeometryProps(val weight: String? = null, val nodeFrom: Long? = null, val nodeTo: Long? = null)
Link copied to clipboard
@Serializable
data class GraphEdge(val fromId: Long, val toId: Long, val weight: Double)

Graph edge entry in an ExportResponse.

Link copied to clipboard
@Serializable
data class Node(val nodeId: Long, val location: List<Double>)

Node entry in an ExportResponse.

Link copied to clipboard
object StringAsDoubleSerializer : KSerializer<Double>

ORS sometimes returns numeric fields (e.g., "weight") as strings. This serializer accepts either a JSON number or a string number.

Link copied to clipboard
@Serializable
data class TopoGeometry(val type: String, val arcs: List<Int>, val properties: GeometryProps? = null)
Link copied to clipboard
@Serializable
data class TopoJsonExportResponse(val type: String, val objects: TopoObjects, val arcs: List<List<List<Double>>>, val bbox: List<Double>)

TopoJSON variant of the export response.

Link copied to clipboard
@Serializable
data class TopoObjects(val network: GeometryCollection)

Functions

Link copied to clipboard

DSL for creating ExportRequest objects.